<template>
    <div> <el-container >
        <!-- 头部-->
        <el-header  class="m-header">
            <img class="mlogo" src="../images/logo.png"> 卫生监督管理系统
            <div class="logoutbutton">
                <el-button  type="primary" @click="submitLogout" style="margin-left: 1050px">注销</el-button>
            </div>
        </el-header>
        <!-- 菜单-->
        <el-container>
            <el-aside width="200px">
                <el-menu @select="menuClick">
                    <el-menu-item index="/healthSup/healthSupinterface">
                        <template slot="title"><i class="el-icon-s-custom"></i>监督系统</template>
                    </el-menu-item>
                    <el-menu-item index="/healthSup/healthSupapply">
                        <template slot="title"><i class="el-icon-s-unfold" ></i>信息上传</template>
                    </el-menu-item>
                    <el-menu-item index="/healthSup/healthSupsearch">
                        <template slot="title"><i class="el-icon-s-unfold"></i>信息查询</template>
                    </el-menu-item>
                    <el-menu-item index="/healthSup/healthSuppunish">
                        <template slot="title"><i class="el-icon-s-unfold"></i>处罚下发</template>
                    </el-menu-item>
                    <el-menu-item index="/healthSup/healthSuppunishsearch">
                        <template slot="title"><i class="el-icon-s-unfold"></i>处罚查询</template>
                    </el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>
                <router-view />
            </el-main>
        </el-container>
    </el-container>
    </div>
</template>

<script>
    export default {
        name: "HealthSup",
        methods: {
            menuClick(index) {
                this.$router.push(index);
            },
            submitLogout() {
                this.$confirm('确定要退出登录？', '退出确定', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                }).then(() => {
                    this.$message({
                        type: 'success',
                        message: '退出成功!'
                    });
                    this.$router.replace('/');
                }).catch(() => {
                    this.$router.replace('/healthSup/healthSupinterface');
                });
            },

        }
    }
</script>

<style scoped>

</style>